<?php
// +----------------------------------------------------------------------
// | Dialog.
// +----------------------------------------------------------------------
// | Copyright (c) 2016 http://www.suckseed.cn, All rights reserved.
// +----------------------------------------------------------------------
// | Author: wjf <184521508@qq.com> 2017-07-01
// +----------------------------------------------------------------------

namespace app\admin\controller;

use wjf\controller\AdminBase;

class Dialog extends AdminBase
{
    public function _initialize()
    {
    }

    public function map()
    {
        $location = $this->request->param('location');
        $location = explode(',', $location);
        $lng = empty($location[0]) ? 116.424966 : $location[0];
        $lat = empty($location[1]) ? 39.907851 : $location[1];

        $this->assign(['lng' => $lng, 'lat' => $lat]);
        return $this->fetch();
    }
}